<template>
	<view class="home-swiper1">
		<view class="head">
			<!-- 轮播图 -->
			<swiper :autoplay="true"  :interval="2500" :duration="1000" :circular="true">
				<block>
					<swiper-item v-for="(item,index) in swipers" :key="index">
						<view class="swiper-item">
							<image :src="item" mode="" class="lun"></image>
						</view>
					</swiper-item>
				</block>
			</swiper>
		</view>
	</view>
</template>

<script>
	import api from '../../common/api.js'
	export default {
		data() {
			return {
				swipers:['../../static/imgs/nanner1.png','../../static/imgs/nanner2.png','../../static/imgs/nanner3.png']
			};
		},
		created() {
			this.$api.sendRequest({
				url: api.HOME_banner,
				success: res => {
					//图片不正确 目前不能使用
					console.log(api.HOST+res.data.banner_image);
				}
			});
		}
	}
</script>

<style>
.head{
	width: 100%;
	background: linear-gradient(to bottom, #DCEAFF 0%, #FFFFFF 50%);
	margin-bottom: 20rpx;
}
swiper-item {
		width: 80%;
		height: 800rpx;
	}
	.lun {
		margin-left: 40rpx;
		width: 92%;
		height: 300rpx;
	}
</style>
